﻿using System;
using System.Text;

namespace HigLabo.Net.WindowsLive
{
    /// <summary>
    /// 
    /// </summary>
    public class PostCommand : WindowsLiveCommand
    {
        private String _FolderID = "";
        /// <summary>
        /// 
        /// </summary>
        public override HttpMethodName MethodName
        {
            get
            {
                return HttpMethodName.Post;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public override string GraphApiPath
        {
            get
            {
                return _FolderID;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="folderID"></param>
        public PostCommand(String folderID)
        {
            this._FolderID = folderID;
            this.ContentType = "application/json";
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="folderName"></param>
        /// <param name="folderDesciption"></param>
        public void SetData(String folderName, String folderDesciption)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("{");
            sb.AppendFormat("name: \"{0}\"", folderName);
            sb.Append(",\r\n");
            sb.AppendFormat("description: \"{0}\"", folderDesciption);
            sb.Append("\r\n}");

            //this.Data = Encoding.UTF8.GetBytes(sb.ToString());
        }
    }
}
